package com.codeoss.framework.db.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class OracleDataConvertUtil {
	public static List<Map<String, Object>> doConvert(List<Map<String, Object>> dataList) {
		List<Map<String, Object>> newDataList=new ArrayList<Map<String, Object>>();
		for (int i = 0; i < dataList.size(); i++) {
			Map<String, Object> dataMap = (Map<String, Object>) dataList.get(i);
			if(dataMap==null) {
				return dataList;
			}
			dataMap.remove("ROW_ID");
			Map<String, Object> newMap = new HashMap<String, Object>();
			Iterator<Map.Entry<String, Object>> it = dataMap.entrySet().iterator();
			while (it.hasNext()) {
				Map.Entry<String, Object> entry = it.next();
				newMap.put(entry.getKey().toLowerCase(), entry.getValue());
			}
			newDataList.add(newMap);
		}
		return newDataList;
	}
}
